package com.ncsc.erp.model;
// Generated 20 มิ.ย. 2557, 12:55:43 by Hibernate Tools 3.4.0.CR1


import java.math.BigDecimal;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * FaJournalLine generated by hbm2java
 */
@Entity
@Table(name="fa_journal_line"
    ,catalog="ncsc_erp"
)
public class FaJournalLine  implements java.io.Serializable {


     private FaJournalLineId id;
     private SysOrg sysOrg;
     private FaChartOfAccount faChartOfAccount;
     private FaJournal faJournal;
     private BigDecimal jnDrAmt;
     private BigDecimal jnCrAmt;
     private short jnStatusDrCr;
     private String jnLineDocCode;

    public FaJournalLine() {
    }

	
    public FaJournalLine(FaJournalLineId id, FaJournal faJournal, BigDecimal jnDrAmt, BigDecimal jnCrAmt, short jnStatusDrCr) {
        this.id = id;
        this.faJournal = faJournal;
        this.jnDrAmt = jnDrAmt;
        this.jnCrAmt = jnCrAmt;
        this.jnStatusDrCr = jnStatusDrCr;
    }
    public FaJournalLine(FaJournalLineId id, SysOrg sysOrg, FaChartOfAccount faChartOfAccount, FaJournal faJournal, BigDecimal jnDrAmt, BigDecimal jnCrAmt, short jnStatusDrCr, String jnLineDocCode) {
       this.id = id;
       this.sysOrg = sysOrg;
       this.faChartOfAccount = faChartOfAccount;
       this.faJournal = faJournal;
       this.jnDrAmt = jnDrAmt;
       this.jnCrAmt = jnCrAmt;
       this.jnStatusDrCr = jnStatusDrCr;
       this.jnLineDocCode = jnLineDocCode;
    }
   
     @EmbeddedId

    
    @AttributeOverrides( {
        @AttributeOverride(name="jnNo", column=@Column(name="JN_NO", nullable=false) ), 
        @AttributeOverride(name="jnSeqNo", column=@Column(name="JN_SEQ_NO", nullable=false) ) } )
    public FaJournalLineId getId() {
        return this.id;
    }
    
    public void setId(FaJournalLineId id) {
        this.id = id;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="JN_LINE_ORG_NO")
    public SysOrg getSysOrg() {
        return this.sysOrg;
    }
    
    public void setSysOrg(SysOrg sysOrg) {
        this.sysOrg = sysOrg;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="JN_ACC_NO")
    public FaChartOfAccount getFaChartOfAccount() {
        return this.faChartOfAccount;
    }
    
    public void setFaChartOfAccount(FaChartOfAccount faChartOfAccount) {
        this.faChartOfAccount = faChartOfAccount;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="JN_NO", nullable=false, insertable=false, updatable=false)
    public FaJournal getFaJournal() {
        return this.faJournal;
    }
    
    public void setFaJournal(FaJournal faJournal) {
        this.faJournal = faJournal;
    }

    
    @Column(name="JN_DR_AMT", nullable=false, precision=15)
    public BigDecimal getJnDrAmt() {
        return this.jnDrAmt;
    }
    
    public void setJnDrAmt(BigDecimal jnDrAmt) {
        this.jnDrAmt = jnDrAmt;
    }

    
    @Column(name="JN_CR_AMT", nullable=false, precision=15)
    public BigDecimal getJnCrAmt() {
        return this.jnCrAmt;
    }
    
    public void setJnCrAmt(BigDecimal jnCrAmt) {
        this.jnCrAmt = jnCrAmt;
    }

    
    @Column(name="JN_STATUS_DR_CR", nullable=false)
    public short getJnStatusDrCr() {
        return this.jnStatusDrCr;
    }
    
    public void setJnStatusDrCr(short jnStatusDrCr) {
        this.jnStatusDrCr = jnStatusDrCr;
    }

    
    @Column(name="JN_LINE_DOC_CODE", length=50)
    public String getJnLineDocCode() {
        return this.jnLineDocCode;
    }
    
    public void setJnLineDocCode(String jnLineDocCode) {
        this.jnLineDocCode = jnLineDocCode;
    }




}


